/*
   this is practise for basic c programming
   */

struct d_node
{
    struct d_node *prev;
    struct d_node *next;
    int elem;
};

typedef struct d_node _DNode;
typedef struct d_node *_DList;

extern _DNode *create_node(void);
extern void destroy_node(_DNode *node);
extern _DList create_list(void);
extern void destroy_list(_DList head);
extern int insert_to_head(_DList head, _DNode *node);
extern int insert_to_tail(_DList head, _DNode *node);
extern int delete_node(_DList head,_DNode *node);
